/**
 * 
 */
package ar.com.greensoft.neosystem.model.internacion;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import ar.com.greensoft.neosystem.model.PersonaJuridica;

/**
 * 
 * @author Jorge E. Villaverde
 * @since 22/06/2013
 * @version 1.0.0
 */
@Entity
@Table(name="laboratorio")
@NamedQueries({
	@NamedQuery(name=Laboratorio.FIND_ALL_QUERY_NAME, query="SELECT c FROM Laboratorio c"),
	@NamedQuery(name=Laboratorio.COUNT_QUERY_NAME,    query="SELECT COUNT(c) FROM Laboratorio c")
})
public class Laboratorio extends PersonaJuridica {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8650198093238065364L;

	public static final String FIND_ALL_QUERY_NAME = "Laboratorio.findAll";
	public static final String COUNT_QUERY_NAME = "Laboratorio.count";
	
	@OneToMany(orphanRemoval=true, 
			cascade={CascadeType.REMOVE, CascadeType.PERSIST},
			mappedBy="laboratorio")
	private List<Remedio> remedios;

	public List<Remedio> getRemedios() {
		return remedios;
	}

	public void setRemedios(List<Remedio> remedios) {
		this.remedios = remedios;
	}
}
